module.exports = () => {
    return async (ctx,next) => {
        if(ctx.request.path === '/bookslist'){
            await next();
        }else{
            if(ctx.request.header['egg-identity'] && ctx.request.header['egg-identity'] ==='admin'){
                await next();
            }else{
                ctx.body = {
                    msg:"无权限",
                    status:401
                }
            }
        }
    }
}